package cn.wit.test;

import java.util.HashMap;
import java.util.Map;

import org.junit.Test;

public class DemoBook {
	@Test
	public void test() {
		Book book1 = new Book(1,"仙逆1",40);
		Book book2 = new Book(2,"仙逆2",19);
		Book book3 = new Book(3,"仙逆3",60);
		Book[] a= {book1,book2,book3};
		
		double max = 0;
		int j = 0;
		
		for(int i =0;i<3;i++) {
			if(a[i].getPrice()>max) {
				max=a[i].getPrice();
				j=i;
				
			}
		}

		System.out.println(a[j].toString());
	}

}
